@charset "UTF-8";

/* 全局样式 */
body, table {
    font-size: 14px;
    font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
    background-color: #f5f5f5;
    padding: 20px;
}

/* 查询区域样式 */
.search {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.search > form > div {
    display: inline-block;
    margin-bottom: 15px;
    margin-right: 15px;
}

.search > form > div > :is(input, select) {
    outline: none;
    border: 1px solid #e6e6e6;
    width: 160px;
    padding: 8px 10px;
    border-radius: 4px;
    transition: border-color 0.3s;
    font-size: 14px;
}

.search > form > div > :is(input, select):focus {
    border-color: #409EFF;
    box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
}

.search > form > div > label {
    margin-right: 8px;
    font-weight: normal;
    color: #606266;
}

/* 按钮区域样式 */
.action {
    border-radius: 8px;
    padding: 15px 20px;
}

.action > button {
    background-color: #409EFF;
    padding: 8px 16px;
    outline: none;
    border: 1px solid transparent;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    margin-right: 10px;
    font-size: 14px;
}

.action > button:hover {
    background-color: #66b1ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(64, 158, 255, 0.3);
}

.action > button:active {
    background-color: #3a8ee6;
    transform: translateY(0);
}

/* 首个按钮 - 查询 */
.action > #search {
    background-color: #67C23A;
}

.action > #search:hover {
    background-color: #85ce61;
    box-shadow: 0 4px 8px rgba(103, 194, 58, 0.3);
}

/* 第二个按钮 - 新增 */
.action > #add {
    background-color: #E6A23C;
}

.action > #add:hover {
    background-color: #ebb563;
    box-shadow: 0 4px 8px rgba(230, 162, 60, 0.3);
}

/* 表格样式 */
#tbl {
    border-collapse: collapse;
    width: 100%;
    margin-top: 0;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

#tbl tr > :is(td, th) {
    border: 1px solid #e6e6e6;
    padding: 12px 15px;
    text-align: center;
}

#tbl th {
    background-color: #f8f9fa;
    font-weight: bold;
    color: #333;
    position: relative;
}

#tbl th::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background-color: #e6e6e6;
}

#tbl tr:hover {
    background-color: #f5f7fa;
    transition: background-color 0.3s;
}

#tbl tr:nth-child(even) {
    background-color: #fafafa;
}

#tbl tr:nth-child(even):hover {
    background-color: #f5f7fa;
}

/* 操作按钮样式 */
.action {
    display: flex;
    justify-content: center;
    gap: 5px;
}

.action button {
    padding: 5px 10px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 13px;
}

#edit {
    background-color: #d6c181;
    color: #212529;
}

#edit:hover {
    background-color: #dcbf6d;
    transform: none;
    box-shadow: none;
}

#del {
    background-color: #dd747e;
    color: white;
}

#del:hover {
    background-color: #c82333;
    transform: none;
    box-shadow: none;
}

/* 分页区域样式 */
.paginate-div {
    margin-top: 20px;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
    text-align: center;
}

.paginate {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.paginate > li {
    display: inline-block;
    margin: 0 3px;
}

.paginate > li > a, .paginate > li > span {
    display: inline-block;
    padding: 8px 14px;
    text-align: center;
    text-decoration: none;
    border: 1px solid #e6e6e6;
    margin: 0 2px;
    color: #666;
    border-radius: 4px;
    transition: all 0.3s;
    font-size: 14px;
}

.paginate > li > a:hover {
    background-color: #409EFF;
    color: #fff;
    border-color: #409EFF;
    transform: translateY(-2px);
}

.paginate > li.active > a {
    background-color: #409EFF;
    color: #fff;
    border-color: #409EFF;
    font-weight: bold;
}

.paginate > li.first > a,
.paginate > li.last > a {
    background-color: #f4f4f5;
    color: #606266;
    border-color: #e6e6e6;
}

.paginate > li.first > a:hover,
.paginate > li.last > a:hover {
    background-color: #409EFF;
    color: #fff;
    border-color: #409EFF;
}

.paginate > li.prev > a,
.paginate > li.next > a {
    background-color: #f4f4f5;
    color: #606266;
    border-color: #e6e6e6;
}

.paginate > li.prev > a:hover,
.paginate > li.next > a:hover {
    background-color: #409EFF;
    color: #fff;
    border-color: #409EFF;
}

.paginate::after {
    content: "";
    display: block;
    clear: both;
    width: 0;
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
    body {
        padding: 10px;
    }

    .search > form > div {
        display: block;
        margin-bottom: 10px;
    }

    .search > form > div > :is(input, select) {
        width: calc(100% - 80px);
    }

    .paginate {
        flex-wrap: wrap;
    }

    .paginate > li {
        margin: 2px;
    }

    .paginate > li > a, .paginate > li > span {
        padding: 6px 10px;
        font-size: 13px;
    }
}
